/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.gui.Gui;
/*     */ import net.minecraft.nbt.NBTTagCompound;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import net.minecraft.util.math.MathHelper;
/*     */ import org.lwjgl.opengl.GL11;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class wt
/*     */   extends Gui
/*     */ {
/*  16 */   public static final ResourceLocation u = new ResourceLocation("textures/gui/widgets.png");
/*     */   
/*     */   private static final int j = 14;
/*     */   
/*     */   private static final int c = 20;
/*     */   
/*     */   private static final int r = 150;
/*     */   
/*     */   private static final int f = 82;
/*     */   private static final int s = 3;
/*     */   private final Minecraft m;
/*     */   public final jp.eos/moe/dragoncore/rz l;
/*     */   
/*     */   public wt(jp.eos/moe/dragoncore/rz eos/moe/dragoncore/rz1, int i, int j) {
/*  30 */     this.l = eos/moe/dragoncore/rz1;
/*  31 */     this.t = i;
/*  32 */     this.z = j;
/*  33 */     this.m = Minecraft.func_71410_x();
/*  34 */     this.q = !eos/moe/dragoncore/rz1.g.func_82582_d();
/*  35 */     this.w = (eos/moe/dragoncore/rz1.g.func_82582_d() ? "保存 " : "加载 ") + eos/moe/dragoncore/rz1.q;
/*  36 */     this.g = -1;
/*  37 */     v();
/*     */   }
/*     */   private final int t; private int d; private int z; private int i; private String w; private boolean q;
/*     */   private int g;
/*     */   
/*     */   public void draw(int i, int j) {
/*  43 */     int k = inBounds(i, j) ? 16777120 : 16777215;
/*  44 */     v(this.d, this.z, 0, 66, this.i, 20);
/*  45 */     func_73732_a(this.m.field_71466_p, this.w, this.d + this.i / 2, this.z + 6, k);
/*  46 */     if (this.g != -1 && this.g / 6 % 2 == 0) {
/*  47 */       this.m.field_71466_p.func_175063_a("_", (this.d + (this.i + this.m.field_71466_p.func_78256_a(this.w)) / 2 + 1), (this.z + 6), 16777215);
/*     */     }
/*     */     
/*  50 */     if (this.q) {
/*  51 */       k = inBoundsOfX(i, j) ? 16777120 : 16777215;
/*  52 */       v(z(), v(), 0, 66, 14, 14);
/*  53 */       func_73732_a(this.m.field_71466_p, "x", this.d - 3 - 7, this.z + 6, k);
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean inBoundsOfX(int i, int j) {
/*  80 */     int k = z();
/*  81 */     int m = v();
/*  82 */     return (this.q && i >= k && j >= m && i < k + 14 && j < m + 14);
/*     */   }
/*     */   
/*     */   public boolean inBounds(int i, int j) {
/*  86 */     return (i >= this.d && j >= this.z && i < this.d + this.i && j < this.z + 20);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void reset() {
/*  98 */     this.q = false;
/*  99 */     this.l.g = new NBTTagCompound();
/* 100 */     this.w = "保存 " + this.l.q;
/* 101 */     v();
/*     */   }
/*     */ 
/*     */   
/*     */   public void saved() {
/* 106 */     this.q = true;
/* 107 */     this.w = "加载 " + this.l.q;
/* 108 */     v();
/*     */   }
/*     */ 
/*     */   
/*     */   public void keyTyped(char c, int i) {
/* 113 */     if (i == 14) {
/* 114 */       backSpace();
/*     */     }
/* 116 */     if (Character.isDigit(c) || Character.isLetter(c)) {
/* 117 */       this.l.q += c;
/* 118 */       this.w = (this.l.g.func_82582_d() ? "保存 " : "加载 ") + this.l.q;
/* 119 */       v();
/*     */     } 
/*     */   }
/*     */ 
/*     */   
/*     */   public void backSpace() {
/* 125 */     if (this.l.q.length() > 0) {
/* 126 */       this.l.q = this.l.q.substring(0, this.l.q.length() - 1);
/* 127 */       this.w = (this.l.g.func_82582_d() ? "保存 " : "加载 ") + this.l.q;
/* 128 */       v();
/*     */     } 
/*     */   }
/*     */   
/*     */   public void startEditing() {
/* 133 */     this.g = 0;
/*     */   }
/*     */   
/*     */   public void stopEditing() {
/* 137 */     this.g = -1;
/*     */   }
/*     */ 
/*     */   
/*     */   public void update() {
/* 142 */     this.g++;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\wt.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */